<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.lp.cfg.ProConfig" %>
<!DOCTYPE html>
<html>
<head>
	<%@ include  file="/WEB-INF/oss/base/common/variable.jsp"%>
    <%@ include  file="/WEB-INF/oss/base/common/resource_lib.jsp"%>
    <%@ include  file="/WEB-INF/oss/base/common/variable_js.jsp"%>
</head>
<script type="text/javascript">
	
</script>
<style type="text/css">
	.grant_auth{
		padding: 20px;
	}
	.scene-style{
		padding-left: 30px;
	    height: 30px;
	    line-height: 30px;
	    background: #d9d9d9;
	    color: #333;
	    margin: 2px 0;
	    border-radius: 3px;
	    cursor: pointer;
	}
	.scene-style.active{
		 background: #3499da;
		 color: white; 
	}
	.limiter{
		cursor: pointer;
	}
</style>
<body>
	<div class="app-container">
		<div class="search-condition" type-option="search_table" config-option=" 'submit':'#searchbtns',
															'table':'#init-table',
															'wait_flag':true">
				<input type-name="device_code" placeholder="设备号查询"  class="input input-auto" />
				<button id="searchbtns" class="button ml-20 bg-sub"><span class="icon-search"></span> 查询</button>
		</div>
		
		 <div style="margin-top:10px;">
			<div id="init-table" type-option="table"  config-option="url:'/admin/page/node',
						param:{ },
						columns:[
							{'name':'序号','type':'seq','value':'seq','width':'5%'}, 
							{'name':'设备名称','value':'name','width':'15%'}, 
							{'name':'设备号','value':'device_code','width':'20%'}, 
							{'name':'设备状态','type':'category',value_callback:'statusFunc' ,'value':'iot_node_status','width':'10%',style:{16:'color,#18bbfc;',17:'color,#e33',18:'color,#A9A9A9'}}, 
							{'name':'所属项目','value':'scene_name','width':'15%'},
							{'name':'新增时间','type':'time','value':'atime','width':'15%'},
							{'name':'操作','type':'self','value_callback':'value_function','width':'20%'}
							]" > 
			</div>
		</div>  
	</div>
	
	<script type="text/javascript">
		
		function value_function(data,seq){
			return "<button type='button' onclick='LoknodeInfo(this,"+data.id+")' class='layui-btn layui-btn-xs layui-btn-normal'>设备详情</button>"
			 ;
		}
		
		function LoknodeInfo(obj,s){
			// 打开窗口查看设备详情
			layer.open({
			      type: 2,
			      title: '设备详情',
			      shadeClose: true,
			      shade: 0.7,
			      maxmin: true, //开启最大化最小化按钮
			      area: ['100%', '100%'],
			      content: "<%=basePath%>/page/devicedetail/index.html?id=" 
			    		  + s+"&ucode=${user.user_key}"
			   });
			
		}
	
	</script>
	
</body>
</html>